package com.wyk.springbootdemo.entity;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@PropertySource({"classpath:application.properties"})
@ConfigurationProperties(prefix = "com.dj")
@Data
public class ServerSetings {
    @Value("${com.dj.name}")
    private String username;
    private String pwd;
}
